<template>
  <div class="good-list-item" v-for="(item,index) in goodslistitems">
    <div class="item-img">
      <img :src="item.image" alt="">
    </div>
    <div class="goods-info">
      <div class="goods-name">
        <strong>
          {{item.name}}
        </strong>
      </div>
      <div class="goods-description">
        {{item.description}}
      </div>
      <div class="goods-description">
        <span>月售{{item.sellCount}}份</span><span>  好评率{{item.rating}}%</span>
      </div>
      <div class="goods-price">
            <span>
              <strong>
                ￥{{item.price}}
              </strong>
            </span>
        <span class="good-add">
              <img src="../../../assets/img/添加.svg" alt="">
            </span>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "goodsListItem",
    props:{
      goodslistitems:{
        type:Array,
        default:[]
      }
    }
  }
</script>

<style scoped>
  .good-list-item{
    padding-left: 5px;
    height: 100px;

    box-shadow: 0 1px 1px rgba(100,100,100,0.2);
    display: flex;

  }
  .good-list-item img{
    width: 75px;
    height: 75px;
  }
  .goods-name{
    font-size: 14px;
    height: 15px;

  }
  .item-img{
    width: 40%;
    height: 100%;
    text-align: center;
    padding-top: 13px;

  }
  .goods-info{
    flex: 1;
    padding-top: 13px;
    font-size: 14px;

  }
  .goods-description{
    font-size: 12px;
    padding-top: 5px;
    color: #77787b;
    text-overflow:ellipsis;
    height: 15px;
    line-height: 15px;
    overflow: hidden;
  }
  .goods-price{
    margin-top: 8px;
    color: red;
  }
  .good-add{
    float: right;
    margin-right: 20px;
  }
  .good-add img{
    width: 19px;
    height: 19px;

  }
</style>